Skip to content

fix(connectors): stop rendering counter metrics with a doubled _total - #3921

Merged
hubcio merged 2 commits into
masterfrom
fix/metrics-total-suffix
Aug 19, 2026
Merged

fix(connectors): stop rendering counter metrics with a doubled _total#3921
hubcio merged 2 commits into
masterfrom
fix/metrics-total-suffix

Conversation

@hubcio

@hubcio hubcio commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The runtime registered its six counter families under names that
already ended in _total, and the OpenMetrics encoder appends that
suffix itself, so every scrape exposed names like
iggy_connector_errors_total_total. The runtime README documented the
un-doubled names all along, so no scraper ever saw what the docs
promised.

Drop the literal suffix at registration and let the encoder add it.
Gauges stay as they are: the encoder appends nothing to them, so
their names already rendered correctly, including the ones that end
in _total.

The existing tests could not catch this. They asserted with
contains() on a name that is a substring of the doubled one, which
passes on broken and on fixed code alike. The new test compares the
full set of rendered series names, so a silent rename fails too, and
the live-runtime scrape test now rejects a doubled suffix on the
wire.

This changes operator-facing series names, so anything scraping the
doubled names has to be updated.

The runtime registered its six counter families under names that
already ended in _total, and the OpenMetrics encoder appends that
suffix itself, so every scrape exposed names like
iggy_connector_errors_total_total. The runtime README documented the
un-doubled names all along, so no scraper ever saw what the docs
promised.

Drop the literal suffix at registration and let the encoder add it.
Gauges stay as they are: the encoder appends nothing to them, so
their names already rendered correctly, including the ones that end
in _total.

The existing tests could not catch this. They asserted with
contains() on a name that is a substring of the doubled one, which
passes on broken and on fixed code alike. The new test compares the
full set of rendered series names, so a silent rename fails too, and
the live-runtime scrape test now rejects a doubled suffix on the
wire.

This changes operator-facing series names, so anything scraping the
doubled names has to be updated.
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Aug 18, 2026
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.69%. Comparing base (ab257a0) to head (6a1aa4d).

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3921       +/-   ##
=============================================
- Coverage     83.82%   58.69%   -25.14%     
  Complexity     1358     1358               
=============================================
  Files          1212     1211        -1     
  Lines        166148   137650    -28498     
  Branches     133622   105124    -28498     
=============================================
- Hits         139272    80789    -58483     
- Misses        23253    53374    +30121     
+ Partials       3623     3487      -136     
Components Coverage Δ
Rust Core 51.33% <100.00%> (-33.29%) ⬇️
Java SDK 66.67% <ø> (ø)
C# SDK 76.08% <ø> (ø)
Python SDK 90.00% <ø> (ø)
PHP SDK 84.48% <ø> (ø)
Node SDK 95.84% <ø> (ø)
Go SDK 68.32% <ø> (ø)
Files with missing lines Coverage Δ
core/connectors/runtime/src/metrics.rs 99.16% <100.00%> (+0.06%) ⬆️

... and 386 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio
hubcio merged commit 3cd0860 into master Aug 19, 2026
177 of 187 checks passed
@hubcio
hubcio deleted the fix/metrics-total-suffix branch August 19, 2026 11:09
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants